package com.rankeiot.platform.domain;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;
import java.util.Date;

@Schema(description = "慢SQL日志")
@Data
@Entity(tableName=SlowSqlLog.TABLE)
public class SlowSqlLog implements Serializable {
    public static final String TABLE="t_slow_sql_log";
    @Id(strategy = "identity")
    @Column(name = "id", length = 20L, type = Types.INTEGER, nullable = false)
    private long id;
    @Column(name = "log_sql", length = 255L, type = Types.VARCHAR)
    private String sql;
    @Column(name = "take_time", length = 20L, type = Types.INTEGER)
    private long takeTime;
    @Column(name = "log_time", length = 20L, type = Types.TIMESTAMP)
    private Date logTime;
    @Column(name = "code_trace", length = 255L, type = Types.VARCHAR)
    private String codeTrace;
    @Column(name = "over_time_count", length = 20L, type = Types.INTEGER)
    private long overTimeCount = 1L;
}
